function animation(ele, target, callback) {
    // 执行动画之前 清除之前的还未执行完的动画
    clearInterval(ele.timer);
    ele.timer = setInterval(function() {
        if (ele.offsetLeft == target) {
            clearInterval(ele.timer);
            if (callback) {
                callback();
            }
        } else {
            var moveLeft = (target - ele.offsetLeft) / 10;
            moveLeft = moveLeft > 0 ? Math.ceil(moveLeft) : Math.floor(moveLeft);
            console.log("moveLeft" + moveLeft);
            console.log("offsetLeft" + ele.offsetLeft);
            ele.style.left = ele.offsetLeft + moveLeft + "px";
        }
    }, 30)

}